from common.setting import ensure_path_sep
from utils.mysqlUtils.db_pool import Database

zhcxkj_center_strategy_comprehensive_db= Database(ensure_path_sep("\\config\\shopeev2_config.yaml.bak"), "test_jdw_database")


class T_Strategy_rule_allegro:



    @staticmethod
    def t_strategy_rule_allegro_by_strategy_id(strategy_id):
        get_t_strategy_rule_allegro = f"""
        select *
        from test_zhcxkj_center_strategy_comprehensive.t_strategy_rule_allegro
        where strategy_id = %s 
        """
        t_strategy_rule_allegro = zhcxkj_center_strategy_comprehensive_db.fetch_all(get_t_strategy_rule_allegro,(strategy_id,))
        return get_t_strategy_rule_allegro